package com.leo;

import org.slf4j.bridge.SLF4JBridgeHandler;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ApplicationContextInitializer;
import zipkin.server.ZipkinServer;
import zipkin2.server.internal.EnableZipkinServer;
import zipkin2.server.internal.ZipkinActuatorImporter;
import zipkin2.server.internal.ZipkinModuleImporter;
import zipkin2.server.internal.banner.ZipkinBanner;

@SpringBootConfiguration
@EnableAutoConfiguration
@EnableZipkinServer
public class ZipkinApplication {

    public static void main(String[] args) {
        (new SpringApplicationBuilder(new Class[]{ZipkinServer.class})).banner(new ZipkinBanner()).initializers(new ApplicationContextInitializer[]{new ZipkinModuleImporter(), new ZipkinActuatorImporter()}).logStartupInfo(false).properties(new String[]{"spring.boot.enableautoconfiguration=false", "spring.config.name=zipkin-server"}).run(args);
    }

    static {
        SLF4JBridgeHandler.removeHandlersForRootLogger();
        SLF4JBridgeHandler.install();
    }
}
